AGBINC		=	$(AGBDIR)/include

.SFILES		=	$(wildcard AgbSys*.s)
.CFILES		=	
.OFILES		=	$(.SFILES:.s=.o) #$(.CFILES:.c=.o)
ASFLAGS		=	       -I$(AGBINC) -mthumb-interwork
CFLAGS		=	-c -O2 -I$(AGBINC) -mthumb-interwork -nostdlib #-DNDEBUG
LDFLAGS		+=	-Map $(MAPFILE) -nostartfiles \
			-Ttext 0x08000000 -Tbss 0x03000000
DEPENDFILE	=	Makedepend
TARGET_LIB	=	libagbsyscall.a


$(TARGET_LIB): $(.OFILES) Makefile
	$(AR) rs $@ $(.OFILES)

.PHONY: all clean depend

all:	clean $(TARGET_LIB)

clean:
	-rm $(.OFILES) $(TARGET_LIB)

depend:
	$(CC) $(CFLAGS) -M $(.CFILES) > $(DEPENDFILE)

$(DEPENDFILE): 
	$(CC) $(CFLAGS) -M $(.CFILES) > $(DEPENDFILE)

#include GasDepend
